% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/namesbyvarlist.R
\name{namesbyvarlist}
\alias{namesbyvarlist}
\alias{varlist2names}
\title{Get indicator names within a varlist like names_d}
\usage{
namesbyvarlist(varlist, nametype = c("rname", "longname", "apiname")[1])
}
\arguments{
\item{varlist}{one character string like "names_d", or a vector of them}

\item{nametype}{vector of 1 or more names of columns in map_headernames, or a shortcut type that can be
api, csv, r, original, long, shortlabel}
}
\value{
a data.frame one row per indicator, one col per nametype and a column identifying the varlist
}
\description{
Get indicator names within a varlist like names_d
}
\details{
varlist2names() is a way to just get a vector of variable names even if the varlist is not stored as a separate data object
and is only found in the map_headernames$varlist column:

varlist2names(c('names_d', 'names_d_subgroups'))

c(names_d, names_d_subgroups)
}
\examples{
 unique(map_headernames$varlist)
 
 namesbyvarlist('names_e_avg', 'rname')
 namesbyvarlist('names_d')
 namesbyvarlist('names_d', 'r')
 namesbyvarlist('names_d', 'long')
 namesbyvarlist('names_d', 'shortlabel')
 
 namesbyvarlist( 'names_e_pctile', c('r', 'longname'))    
 namesbyvarlist(c('names_e_pctile', 'names_e_state_pctile'), 
   c('varlist', 'rname', 'apiname', 'csvname', 'shortlabel', 'longname'))
}
\seealso{
\code{\link[=names_from_varlist]{names_from_varlist()}} \code{\link[=varlist2names]{varlist2names()}} \code{\link[=varin_map_headernames]{varin_map_headernames()}} \code{\link[=varinfo]{varinfo()}} \code{\link[=names_whichlist_multi_key]{names_whichlist_multi_key()}} \code{\link[=vnames]{vnames()}}
}
\keyword{internal}
